import java.util.Scanner;

public class User {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String rightId="zhangsan";
        String rightPassword="1234";
        for (int i = 0; i <3 ; i++) {
            String Id=sc.next();
            String Password=sc.next();
            if(rightId.equals(Id) && rightPassword.equals(Password))
            {
                System.out.println("登陆成功");
                break;
            }
            else{
                if(i==2)
                {
                    System.out.println("登陆失败，请找官方咨询");
                }
                else {
                    System.out.println("登陆失败，你还剩下"+(2-i)+"次机会");
                }
            }
        }

    }
}
